package com.example.lanouhn.bantangapp.activities.activities;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.lanouhn.bantangapp.R;

/**
 * Created by lanouhn on 16/7/26.
 */
public class Avatar_SingleProduct_Love_Activity extends Activity {

    private ImageView back;//返回
    private TextView tv_choice;//选择单品
    private TextView tv_Administration;//管理
    private TextView tv_cancel;//取消
    private ImageView iv_move;//移动单品
    private ImageView iv_trash;//垃圾桶

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.avatar_singleproduct_love_activity);

        initView();

        initListener();

    }

    /**
     * 初始化
     */
    private void initView() {
        back = (ImageView) findViewById(R.id.back);
        iv_move= (ImageView) findViewById(R.id.iv_move);
        iv_trash= (ImageView) findViewById(R.id.iv_trash);
        tv_Administration = (TextView) findViewById(R.id.tv_Administration);
        tv_cancel = (TextView) findViewById(R.id.tv_cancel);
        tv_choice = (TextView) findViewById(R.id.tv_choice);
    }

    /**
     * 监听事件
     */
    private void initListener() {
        //返回
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        //管理
        tv_Administration.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                iv_move.setVisibility(View.VISIBLE);
                iv_trash.setVisibility(View.VISIBLE);
                tv_cancel.setVisibility(View.VISIBLE);
                tv_choice.setVisibility(View.VISIBLE);
            }
        });
        tv_cancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                iv_move.setVisibility(View.INVISIBLE);
                iv_trash.setVisibility(View.INVISIBLE);
                tv_cancel.setVisibility(View.INVISIBLE);
                tv_choice.setVisibility(View.INVISIBLE);
            }
        });

    }
}
